import React from "react";
import useFn from "../position";
import MouseUrl from "../assets/mouse.gif";

export default function Mouse() {

  // 获取指定的范围内的随机整数
// function getRandomInt(min, max) {
//   min = Math.ceil(min);
//   max = Math.floor(max);
//   return Math.floor(Math.random() * (max - min)) + min; //不含最大值，含最小值
// }


 let {x,y}=useFn()
  return (
    <div>
      <img
        src={MouseUrl}
        alt=""
        style={{ position: "absolute", left: x, top: y, width: 100 }}
      />
    </div>
  );
}
